package com.lx.test;

public class testdemo {
    public static void main(String[] args) {
        int i = getsum(100);
        System.out.println(i);
    }

    private static int getsum(int i) {
        if(i==1)
        {
            return 1;
        }
        else
        {
            return i + getsum(i-1);
        }
    }
}
